<?php
m2import('phpinchains/util/BundleTool.php');
m2import('phpinchains/psp/PSPPage.php');
m2import('phpinchains/psp/OutputWriter.php');
m2import('phpinchains/tagsupport/HtmlInput.php');
m2import('phpinchains/tagsupport/URL.php');
m2import('phpinchains/tagsupport/functions.inc.php');
class defaulterrorPSPPage extends phpinchains_psp_PSPPage 
{
   var $validatormap;
   var $objcache;
   var $relativeFilePath = 'view/defaulterror.psp';
   var $fieldMap = array (
);   function validate (& $dispatcher, & $env, & $actionform, $formname, $basedir, $fieldname = "")
   {
       $this->basedir = $basedir;
       $this->dispatcher = & $dispatcher;
       include($basedir.'action-config.xml.php');
       $this->validatormap = $validators;
       $validationErrors = & $actionform->getRef('validationErrors');
       $validationErrors->setForm($formname);
       
       return !$validationErrors->hasErrors();
   }
   function render (& $dispatcher, & $env, & $actionform, $basedir)
   {
       $this->basedir = $basedir;
       $this->dispatcher = & $dispatcher;
       $ctx = & phpinchains_ApplicationContext::getInstance();
       $out = & $ctx->out;
       
$out->write("<html>\n    <head><title>Error</title></head>\n    <body>\n        <h2>Default Error View</h2>\n\n        <b>An error occured:</b><br/>\n        ");
$out->write(__id($env, $actionform, array('responseScope', 'errorLocation')));
$out->write("<br/>\n        ");
$out->write(__id($env, $actionform, array('responseScope', 'errorCause')));
$out->write("<br/>\n        ");
$out->write(__id($env, $actionform, array('responseScope', 'errorSubject')));
$out->write("\n    </body>\n</html>");

       return $out;
   }
   function getJSCode (& $dispatcher, & $env, & $actionform)
   {
       $this->dispatcher = & $dispatcher;
       $jscode = "";
       return $jscode;
   }
}
?>